3.5.26 \(\int \frac {a+b \log (c (d (e+f x)^p)^q)}{(g+h x)^3} \, dx\) [426]

Optimal. Leaf size=119 \[ \frac {b f p q}{2 h (f g-e h) (g+h x)}+\frac {b f^2 p q \log (e+f x)}{2 h (f g-e h)^2}-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{2 h (g+h x)^2}-\frac {b f^2 p q \log (g+h x)}{2 h (f g-e h)^2} \]

[Out]

1/2*b*f*p*q/h/(-e*h+f*g)/(h*x+g)+1/2*b*f^2*p*q*ln(f*x+e)/h/(-e*h+f*g)^2+1/2*(-a-b*ln(c*(d*(f*x+e)^p)^q))/h/(h*
x+g)^2-1/2*b*f^2*p*q*ln(h*x+g)/h/(-e*h+f*g)^2

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {2442, 46, 2495} \begin {gather*} -\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{2 h (g+h x)^2}+\frac {b f^2 p q \log (e+f x)}{2 h (f g-e h)^2}-\frac {b f^2 p q \log (g+h x)}{2 h (f g-e h)^2}+\frac {b f p q}{2 h (g+h x) (f g-e h)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d*(e + f*x)^p)^q])/(g + h*x)^3,x]

[Out]

(b*f*p*q)/(2*h*(f*g - e*h)*(g + h*x)) + (b*f^2*p*q*Log[e + f*x])/(2*h*(f*g - e*h)^2) - (a + b*Log[c*(d*(e + f*
x)^p)^q])/(2*h*(g + h*x)^2) - (b*f^2*p*q*Log[g + h*x])/(2*h*(f*g - e*h)^2)

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2495

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{(g+h x)^3} \, dx &=\text {Subst}\left (\int \frac {a+b \log \left (c d^q (e+f x)^{p q}\right )}{(g+h x)^3} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{2 h (g+h x)^2}+\text {Subst}\left (\frac {(b f p q) \int \frac {1}{(e+f x) (g+h x)^2} \, dx}{2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{2 h (g+h x)^2}+\text {Subst}\left (\frac {(b f p q) \int \left (\frac {f^2}{(f g-e h)^2 (e+f x)}-\frac {h}{(f g-e h) (g+h x)^2}-\frac {f h}{(f g-e h)^2 (g+h x)}\right ) \, dx}{2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {b f p q}{2 h (f g-e h) (g+h x)}+\frac {b f^2 p q \log (e+f x)}{2 h (f g-e h)^2}-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{2 h (g+h x)^2}-\frac {b f^2 p q \log (g+h x)}{2 h (f g-e h)^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 187, normalized size = 1.57 \begin {gather*} -\frac {a f^2 g^2-2 a e f g h+a e^2 h^2-b f^2 g^2 p q+b e f g h p q-b f^2 g h p q x+b e f h^2 p q x-b f^2 p q (g+h x)^2 \log (e+f x)+b (f g-e h)^2 \log \left (c \left (d (e+f x)^p\right )^q\right )+b f^2 g^2 p q \log (g+h x)+2 b f^2 g h p q x \log (g+h x)+b f^2 h^2 p q x^2 \log (g+h x)}{2 h (f g-e h)^2 (g+h x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d*(e + f*x)^p)^q])/(g + h*x)^3,x]

[Out]

-1/2*(a*f^2*g^2 - 2*a*e*f*g*h + a*e^2*h^2 - b*f^2*g^2*p*q + b*e*f*g*h*p*q - b*f^2*g*h*p*q*x + b*e*f*h^2*p*q*x
- b*f^2*p*q*(g + h*x)^2*Log[e + f*x] + b*(f*g - e*h)^2*Log[c*(d*(e + f*x)^p)^q] + b*f^2*g^2*p*q*Log[g + h*x] +
 2*b*f^2*g*h*p*q*x*Log[g + h*x] + b*f^2*h^2*p*q*x^2*Log[g + h*x])/(h*(f*g - e*h)^2*(g + h*x)^2)

________________________________________________________________________________________

Maple [F]
time = 0.21, size = 0, normalized size = 0.00 \[\int \frac {a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )}{\left (h x +g \right )^{3}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(d*(f*x+e)^p)^q))/(h*x+g)^3,x)

[Out]

int((a+b*ln(c*(d*(f*x+e)^p)^q))/(h*x+g)^3,x)

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 176, normalized size = 1.48 \begin {gather*} \frac {1}{2} \, b f p q {\left (\frac {f \log \left (f x + e\right )}{f^{2} g^{2} h - 2 \, f g h^{2} e + h^{3} e^{2}} - \frac {f \log \left (h x + g\right )}{f^{2} g^{2} h - 2 \, f g h^{2} e + h^{3} e^{2}} + \frac {1}{f g^{2} h - g h^{2} e + {\left (f g h^{2} - h^{3} e\right )} x}\right )} - \frac {b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{2 \, {\left (h^{3} x^{2} + 2 \, g h^{2} x + g^{2} h\right )}} - \frac {a}{2 \, {\left (h^{3} x^{2} + 2 \, g h^{2} x + g^{2} h\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g)^3,x, algorithm="maxima")

[Out]

1/2*b*f*p*q*(f*log(f*x + e)/(f^2*g^2*h - 2*f*g*h^2*e + h^3*e^2) - f*log(h*x + g)/(f^2*g^2*h - 2*f*g*h^2*e + h^
3*e^2) + 1/(f*g^2*h - g*h^2*e + (f*g*h^2 - h^3*e)*x)) - 1/2*b*log(((f*x + e)^p*d)^q*c)/(h^3*x^2 + 2*g*h^2*x +
g^2*h) - 1/2*a/(h^3*x^2 + 2*g*h^2*x + g^2*h)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 315 vs. \(2 (116) = 232\).
time = 0.39, size = 315, normalized size = 2.65 \begin {gather*} \frac {b f^{2} g h p q x + b f^{2} g^{2} p q - a f^{2} g^{2} - a h^{2} e^{2} - {\left (b f h^{2} p q x + b f g h p q - 2 \, a f g h\right )} e + {\left (b f^{2} h^{2} p q x^{2} + 2 \, b f^{2} g h p q x + 2 \, b f g h p q e - b h^{2} p q e^{2}\right )} \log \left (f x + e\right ) - {\left (b f^{2} h^{2} p q x^{2} + 2 \, b f^{2} g h p q x + b f^{2} g^{2} p q\right )} \log \left (h x + g\right ) - {\left (b f^{2} g^{2} - 2 \, b f g h e + b h^{2} e^{2}\right )} \log \left (c\right ) - {\left (b f^{2} g^{2} q - 2 \, b f g h q e + b h^{2} q e^{2}\right )} \log \left (d\right )}{2 \, {\left (f^{2} g^{2} h^{3} x^{2} + 2 \, f^{2} g^{3} h^{2} x + f^{2} g^{4} h + {\left (h^{5} x^{2} + 2 \, g h^{4} x + g^{2} h^{3}\right )} e^{2} - 2 \, {\left (f g h^{4} x^{2} + 2 \, f g^{2} h^{3} x + f g^{3} h^{2}\right )} e\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g)^3,x, algorithm="fricas")

[Out]

1/2*(b*f^2*g*h*p*q*x + b*f^2*g^2*p*q - a*f^2*g^2 - a*h^2*e^2 - (b*f*h^2*p*q*x + b*f*g*h*p*q - 2*a*f*g*h)*e + (
b*f^2*h^2*p*q*x^2 + 2*b*f^2*g*h*p*q*x + 2*b*f*g*h*p*q*e - b*h^2*p*q*e^2)*log(f*x + e) - (b*f^2*h^2*p*q*x^2 + 2
*b*f^2*g*h*p*q*x + b*f^2*g^2*p*q)*log(h*x + g) - (b*f^2*g^2 - 2*b*f*g*h*e + b*h^2*e^2)*log(c) - (b*f^2*g^2*q -
 2*b*f*g*h*q*e + b*h^2*q*e^2)*log(d))/(f^2*g^2*h^3*x^2 + 2*f^2*g^3*h^2*x + f^2*g^4*h + (h^5*x^2 + 2*g*h^4*x +
g^2*h^3)*e^2 - 2*(f*g*h^4*x^2 + 2*f*g^2*h^3*x + f*g^3*h^2)*e)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(d*(f*x+e)**p)**q))/(h*x+g)**3,x)

[Out]

Exception raised: NotImplementedError >> no valid subset found

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 359 vs. \(2 (116) = 232\).
time = 3.18, size = 359, normalized size = 3.02 \begin {gather*} \frac {b f^{2} h^{2} p q x^{2} \log \left (f x + e\right ) - b f^{2} h^{2} p q x^{2} \log \left (h x + g\right ) + 2 \, b f^{2} g h p q x \log \left (f x + e\right ) - 2 \, b f^{2} g h p q x \log \left (h x + g\right ) + b f^{2} g h p q x - b f h^{2} p q x e + 2 \, b f g h p q e \log \left (f x + e\right ) - b f^{2} g^{2} p q \log \left (h x + g\right ) + b f^{2} g^{2} p q - b f g h p q e - b h^{2} p q e^{2} \log \left (f x + e\right ) - b f^{2} g^{2} q \log \left (d\right ) + 2 \, b f g h q e \log \left (d\right ) - b f^{2} g^{2} \log \left (c\right ) + 2 \, b f g h e \log \left (c\right ) - b h^{2} q e^{2} \log \left (d\right ) - a f^{2} g^{2} + 2 \, a f g h e - b h^{2} e^{2} \log \left (c\right ) - a h^{2} e^{2}}{2 \, {\left (f^{2} g^{2} h^{3} x^{2} - 2 \, f g h^{4} x^{2} e + 2 \, f^{2} g^{3} h^{2} x + h^{5} x^{2} e^{2} - 4 \, f g^{2} h^{3} x e + f^{2} g^{4} h + 2 \, g h^{4} x e^{2} - 2 \, f g^{3} h^{2} e + g^{2} h^{3} e^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g)^3,x, algorithm="giac")

[Out]

1/2*(b*f^2*h^2*p*q*x^2*log(f*x + e) - b*f^2*h^2*p*q*x^2*log(h*x + g) + 2*b*f^2*g*h*p*q*x*log(f*x + e) - 2*b*f^
2*g*h*p*q*x*log(h*x + g) + b*f^2*g*h*p*q*x - b*f*h^2*p*q*x*e + 2*b*f*g*h*p*q*e*log(f*x + e) - b*f^2*g^2*p*q*lo
g(h*x + g) + b*f^2*g^2*p*q - b*f*g*h*p*q*e - b*h^2*p*q*e^2*log(f*x + e) - b*f^2*g^2*q*log(d) + 2*b*f*g*h*q*e*l
og(d) - b*f^2*g^2*log(c) + 2*b*f*g*h*e*log(c) - b*h^2*q*e^2*log(d) - a*f^2*g^2 + 2*a*f*g*h*e - b*h^2*e^2*log(c
) - a*h^2*e^2)/(f^2*g^2*h^3*x^2 - 2*f*g*h^4*x^2*e + 2*f^2*g^3*h^2*x + h^5*x^2*e^2 - 4*f*g^2*h^3*x*e + f^2*g^4*
h + 2*g*h^4*x*e^2 - 2*f*g^3*h^2*e + g^2*h^3*e^2)

________________________________________________________________________________________

Mupad [B]
time = 2.26, size = 180, normalized size = 1.51 \begin {gather*} \frac {b\,f^2\,p\,q\,\mathrm {atanh}\left (\frac {2\,e^2\,h^3-2\,f^2\,g^2\,h}{2\,h\,{\left (e\,h-f\,g\right )}^2}+\frac {2\,f\,h\,x}{e\,h-f\,g}\right )}{h\,{\left (e\,h-f\,g\right )}^2}-\frac {b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )}{2\,h\,\left (g^2+2\,g\,h\,x+h^2\,x^2\right )}-\frac {\frac {a\,e\,h-a\,f\,g+b\,f\,g\,p\,q}{e\,h-f\,g}+\frac {b\,f\,h\,p\,q\,x}{e\,h-f\,g}}{2\,g^2\,h+4\,g\,h^2\,x+2\,h^3\,x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*(d*(e + f*x)^p)^q))/(g + h*x)^3,x)

[Out]

(b*f^2*p*q*atanh((2*e^2*h^3 - 2*f^2*g^2*h)/(2*h*(e*h - f*g)^2) + (2*f*h*x)/(e*h - f*g)))/(h*(e*h - f*g)^2) - (
b*log(c*(d*(e + f*x)^p)^q))/(2*h*(g^2 + h^2*x^2 + 2*g*h*x)) - ((a*e*h - a*f*g + b*f*g*p*q)/(e*h - f*g) + (b*f*
h*p*q*x)/(e*h - f*g))/(2*g^2*h + 2*h^3*x^2 + 4*g*h^2*x)

________________________________________________________________________________________